package com.be.beadmin.system.controller.ProjectSysController;

import com.be.beadmin.common.utils.ResultModel;
import com.be.beadmin.system.cronJob.ProjectInfoJob;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class ProjectInfoController {
    @Resource
    private ProjectInfoJob projectInfoJob;


    @PostMapping("/projectInfo/sync")
    public ResultModel getProjectInfos() throws Exception {
        projectInfoJob.getProjectInfo(null, null, null, null, null, null);
        return ResultModel.success("同步成功");
    }



    @PostMapping("/productOrderInfo/sync")
    public ResultModel getProductOrderInfos() throws Exception {
        projectInfoJob.getProductOrderInfo(null, null, null, null, null, null);
        return ResultModel.success("同步成功");
    }

    @PostMapping("/materialBasicInfo/sync")
    public ResultModel getMaterialBasicInfos() throws Exception {
        projectInfoJob.getMaterialBasicInfo(null, null, null, null, null, null);
        return ResultModel.success("同步成功");
    }


    @PostMapping("/purchaseOrderInfo/sync")
    public ResultModel getPurchaseOrderInfos() throws Exception {
        projectInfoJob.getPurchaseOrderInfo(null, null, null, null, null, null);
        return ResultModel.success("同步成功");
    }


}
